Skip to content

Fix ESP32-S3 cannot reset to bootrom when using USB OTG #7828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hathach
Copy link
Contributor

@hathach hathach commented Feb 10, 2023

Description of Change

This PR fixes an issue when GPIO20 (USB D+) pull-up is not enabled for usb jtag when we switch from OTG to Jtag when reset to bootrom. Which renders upload with OTG-USB is not possible and require manual hold BOOT and reset. The issue is introduced with IDF 4.4.3 specially from this commit espressif/esp-idf@01143bd . As mentioned in the commit message, USB D+ should be re-enabled when setup/install usb jtag.

This has been causing lots of confusion and frustration for our user.

Tests scenarios

Tested with Arduino core v2.0.6 on Espressif ESP32-S3 devkit (literally any S3 board). Steps to reproduce

  • Open an Blink sketch/example
  • Select "ESP32S3 Dev Module" board
  • Select USB Mode to "USB-OTG (TinyUSB)"
  • Select USB CDC on Boot to "Enabled"
  • Select Upload Mode to "USB-OTG CDC (TinyUSB)"

Then only connect the USB OTG connector on the board and click upload. The first it could works, however after the code compiled with v2.0.6 is running. Click upload again, board will disconnect but never re-appear as JTAG CDC since D+ pull up is overrided and disabled.

PS: @me-no-dev This issue is kind of critical since it affects lots of our users. If possible would you please include this in the upcoming release 2.0.7. Thanks.

@ladyada

Screenshot 2023-02-10 23:30:02

@ladyada
Copy link
Contributor

ladyada commented Feb 10, 2023

nice find @hathach !

@hathach hathach changed the title Fix ESP-S3 cannot reset to bootrom when using USB OTG Fix ESP32-S3 cannot reset to bootrom when using USB OTG Feb 12, 2023
@me-no-dev me-no-dev merged commit f69bbfe into espressif:master Feb 13, 2023
@me-no-dev
Copy link
Member

Thanks @hathach !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants